package nn.kohonen;

import nn.functions.ActivationFunction;
import nn.functions.HardlimFunction;
import nn.functions.LinerFunction;
import nn.functions.SigmoidFunction;

public class DistanceFunctionFactory {
	public final static String EUCLIDES_DIST = "ECL";
	public final static String SKALAR_DIST = "SKL";
	public final static String MANHATAN_DIST = "MAN";

	public static ActivationFunction getFunction(String type){
		switch (type) {
		case EUCLIDES_DIST:
			return new LinerFunction();
		case SKALAR_DIST:
			return new HardlimFunction();
		case MANHATAN_DIST:
			return new SigmoidFunction();
		default:
			throw new RuntimeException("function type not supported");
		}

	}
}
